<template>
    <div ref="myechart" class="container"></div>
</template>

<script>
import * as echarts from 'echarts'
export default {
  mounted(){
    this.innitchart()
   },
   methods:{
    innitchart(){
          var mypic = echarts.init(this.$refs.myechart)
          mypic.setOption({
  legend: {
    data: ['男性', '女性']
  },
  xAxis: [
    {
      type: 'category',
      data: ['3月', '4月', '5月', '6月', '7月 ', '8月', '9月'],
      axisPointer: {
        type: 'shadow'
      }
    }
  ],
  yAxis: [
    {
      type: 'value',
      name: '订单数量',
      min: 0,
      max: 250,
      interval: 50,
      axisLabel: {
        formatter: '{value} 单'
      }
    },
  ],
  series: [
    {
      name: '男性',
      type: 'bar',
      data: [
        93, 58, 78, 123, 198, 147, 88
      ]
    },
    {
      name: '女性',
      type: 'bar',
      data: [
        44, 88, 66, 168, 213, 197, 138
      ]
    },
  ]
          })
    }
   }
}
</script>
<style scoped>
.container{
margin-left: 50px;
width: 440px;
height: 350px;
}

</style>>